package com.wzh.yebServe.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * @Author wzh
 * @create 2022/11/12 20:23
 * @Description: 菜单实体类
 */
@TableName("t_menu")
@ApiModel(value = "Menu对象")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Menu implements Serializable {

    private static final  long serialVersionUID=1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "url")
    private String url;

    @ApiModelProperty(value = "path")
    private String path;


    @ApiModelProperty(value = "组件")
    private String component;

    @ApiModelProperty(value = "菜单名")
    private String name;

    @ApiModelProperty(value = "图标")
    private String iconCls;


    @ApiModelProperty(value = "是否启用")
    private Boolean keepAlive;


    @ApiModelProperty(value = "子菜单")
    @TableField(exist = false)
    private List<Menu> children;


    @ApiModelProperty(value = "是否要权限")
    private Boolean requireAuth;

    @ApiModelProperty(value = "父id")
    private  Integer parentId;

    @ApiModelProperty(value = "是否启用")
    private Boolean enabled;

    @ApiModelProperty(value = "角色列表")
    @TableField(exist = false)
    private List<Role> roles;

}
